-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add nio http transport to security plugin #32018
Conversation
Pinging @elastic/es-security |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a couple of minor thing but otherwise LGTM
ServerTransportFilter.extractClientCertificates(logger, threadContext, handler.engine(), nettyChannel); | ||
SSLEngine sslEngine = SSLEngineUtils.getSSLEngine(httpChannel); | ||
|
||
ServerTransportFilter.extractClientCertificates(logger, threadContext, sslEngine, httpChannel); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we move extractClientCertificates into SSLEngineUtils and just have a single method call here?
|
||
import javax.net.ssl.SSLEngine; | ||
|
||
public class SSLEngineUtils { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a private constructor so no one instantiates this class
import static org.elasticsearch.xpack.core.security.transport.SSLExceptionHelper.isNotSslRecordException; | ||
import static org.elasticsearch.xpack.core.security.transport.SSLExceptionHelper.isReceivedCertificateUnknownException; | ||
|
||
public class SecurityHttpExceptionHandler implements BiConsumer<HttpChannel, Exception> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it final
|
||
import java.util.function.Predicate; | ||
|
||
public class NioIPFilter implements Predicate<NioSocketChannel> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it final
@jaymode Can you confirm those were the changes you wanted in regard to |
@tbrooks8 that was exactly what I was looking for 👍 |
Looks like this broke the Kibana CI, which builds from source. I expect we will also see this with the release manager tonight as well. https://kibana-ci.elastic.co/job/elastic+kibana+master+multijob-x-pack/563/console
|
The build was broken due to some issues with the merging of elastic#32018. A method that was public went private before the PR was merged. That did not cause a merge conflict (so the PR was merged successfully). But it did cause the build to fail.
The build was broken due to some issues with the merging of #32018. A method that was public went private before the PR was merged. That did not cause a merge conflict (so the PR was merged successfully). But it did cause the build to fail.
This is related to #27260. It adds the SecurityNioHttpServerTransport
to the security plugin. It randomly uses the nio http transport in
security integration tests.